package com.stock.publiclib.utils;

/**
 * Created by ljgsonx on 2016/1/23.
 */
public class StringUtil {

    /**
     * Description: <p>判断字符串是否为null,或是否为空字符串</p>
     * <p>null或空字符串:true</p>
     * Author: ljgsonx
     * Time: 2016/1/23 12:07
     */
    public static boolean isBlank(String str){
        if(str == null)
            return true;
        str = str.trim();
        if("".equals(str))
            return true;
        return false;
    }

    /**
     * Description: 判断传进来的所有参数,是否有null或有空字符串
     * Author: ljgsonx
     * Time: 2016/1/23 18:13
     */
    public static boolean hasBlank(String... str){
        for(String s:str){
            if(isBlank(s)){
                return true;
            }
        }
        return false;
    }
}
